package com.mrd.gtimp.message.entity;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * 站内信对象 Created by lenovo on 2016/9/23.
 */
@Entity(name = "P_HIS_MESSAGE")
public class Message implements Serializable {


    private static final long serialVersionUID = 5811770542333806441L;
    /**
     * id
     */
    @Id
    @Column(name = "ID_")
    @GenericGenerator(name = "id", strategy = "uuid")
    @GeneratedValue(generator = "id")
    private String id;

    /**
     * 标题
     */
    @Column(name = "TITLE_")
    private String title;

    /**
     * 内容
     */
    @Column(name = "CONTENT_")
    private String content;


    /**
     * 创建时间
     */
    @Column(name = "DATE_")
    private Date date;

    /**
     * 谁发出
     */
    @Column(name = "FROM_")
    private String from;

    /**
     * 发给谁
     */
    @Column(name = "TO_")
    private String to;


    //------ getter/setter
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }
}
